<?php
class IndexController extends Controller {
	
	public function __construct() {
		parent::__construct ();
		$this->view->web_host = $this->getRequest ()->hostUrl;
		$this->view->web_app_url = $this->getRequest ()->hostUrl . "/index.php";
	}
	
	public function Index() {
		echo "index.php";
		$this->getView()->display("index.html");
	}
	
	public function Test() {
// 		if (preg_match("/^\d{2}:\d{2}:\d{2}$/s", "12:01:01")) {
// 			echo 123;
// 		} else {
// 			echo 1;
// 		}
// 		$m = new Model();
// 		$ret = $m->fetchAll("SELECT * FROM picture");
// // 		print_r($ret);
// 		for ($i = 0; $i < count($ret); $i++) {
// 			$s = $ret[$i]['pic_link'];
// 			if (strstr($s, "http")) {
// 				$s = strstr($s, "images/");
// 				$s = substr($s, 7);
// // 				echo $s;
// // 				echo "</br>";
// 				$id = $ret[$i]['pic_id'];
// 				echo "UPDATE picture SET pic_link = '$s' WHERE pic_id = $id";
// 				$m->update("UPDATE picture SET pic_link = '$s' WHERE pic_id = $id");
// 			}
// 		} 
	}
}